home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / fweb / fweb-1.40 / manual / demo2.web < prev    next >
Text File  |  1993-10-29  |  1KB  |  40 lines

  1. @z --- demo2.web ---
  2.  
  3. This file is part of FWEB.  It and its woven output demo1.tex are
  4. included into the user manual fwebman.tex.
  5.  
  6. Author: J. A. Krommes
  7. Version: 1.23
  8. Date:   April 1, 1992
  9.  
  10. @x-----------------------------------------------------------------------------
  11.  
  12. \def\FWEB{\.{FWEB}} % A tex macro definition in the limbo section.
  13.  
  14. @n/ @% Set the global language to Fortran--77, and allow short comments.
  15. @* MIXING LANGUAGES. In \FWEB, languages can be mixed with a minimum of
  16. effort.   
  17. @a
  18.     program main /* In Fortran, a \&{program} statement should always
  19. be used.  */
  20.     call CRTN // We'll actually do the work in a C~routine.
  21.     end
  22.  
  23. @c @% Temporarily change the language of the unnamed module to C.
  24. @<C code@>; // Link into the web a named module in~C.
  25.  
  26. @ This is the start of the next section. At this point, the language has
  27. reverted to the global language of Fortran. However, after the equals sign on
  28. the next line the language is~C until the next section is encountered.
  29. @<C code@>=
  30. void CRTN(void)
  31. {
  32. /* The code parts of the following named modules will be understood to be
  33. in~C, since that is the current language when those names are first
  34. referenced. */
  35. @<Compute@>;
  36. @<Graph@>;
  37. }
  38.  
  39. @* INDEX.
  40.